<?php 
require_once("../include/conn.php");
$newssql="select * from $tb_mv limit 5";
$newsqq=mysql_query($newssql);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<!--幻灯片新闻开始-->
<div id="slideimg">  
    <script language=javascript>
	var focus_width=250     /*幻灯片新闻图片宽度*/
	var focus_height=220    /*幻灯片新闻图片高度*/
	var text_height=18    /*幻灯片新闻文字标题高度*/
	var swf_height = focus_height+text_height

	var pics = '';
	var links = '';
	var texts = '';

	function ati(url, img, title)
	{
		if(pics != '')
		{
			pics = "|" + pics;
			links = "|" + links;
			texts = "|" + texts;
		}

		pics = escape(img) + pics;
		links = escape(url) + links;
		texts = title + texts;
	}
    </script>
	
	
	
    <script language=javascript>	
     <?php 
	 while($news_row=mysql_fetch_array($newsqq)){
	//字符串长度不超过36
	if(strlen($news_row[title])>36){
	$news_title=substr_cut($news_row[title],36);
	}else
	{
		$news_title=$news_row[title];
	}
	 
	 
	 echo  "ati('".$news_row[url]."', '".$news_row[pic]."', '".$news_title."');";
	 
/*       ati('#', 'tp2.jpg', '新闻标题4'); 
      ati('#', 'tp3.jpg', '新闻标题3');
      ati('#', 'tp4.jpg', '新闻标题2');
      ati('#', 'tp5.jpg', '新闻标题1');
 */	}
	?>	
	document.write('<embed src="pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#DADADA" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"/>');
</script>



</div>
<!--幻灯片新闻结束-->
</body>
</html>
